package com.coolw.common.exception;

/**
 * 异常工具类
 *
 * @author coolw
 * @date 2024/4/15 15:20
 */
public final class ExceptionUtil {

    public static BusinessException createBusinessException(String message) {
        return new BusinessException(message);
    }

    public static BusinessException createBusinessException(String message, Throwable e) {
        return new BusinessException(message, e);
    }

    public static BusinessException createBusinessException(ErrorCode errorCode) {
        return new BusinessException(errorCode);
    }

    public static BusinessException createBusinessException(ErrorCode errorCode, Throwable e) {
        return new BusinessException(errorCode, e);
    }
}
